; Bugs?: Please include the the file and version information (from above) with
; the problem description. Developers belonging to one of the Apple
; developer programs can submit bug reports to:
;
; devsupport@apple.com
;
;
IF &TYPE('__QUICKDRAWTEXT__') = 'UNDEFINED' THEN
__QUICKDRAWTEXT__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
include 'MixedMode.a'
ENDIF
; CharToPixel directions
leftCaret EQU 0 ;Place caret for left block
rightCaret EQU -1 ;Place caret for right block
kHilite EQU 1 ;Direction is SysDirection
smLeftCaret EQU 0 ;Place caret for left block - obsolete
smRightCaret EQU -1 ;Place caret for right block - obsolete
smHilite EQU 1 ;Direction is TESysJust - obsolete
;Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar.
onlyStyleRun EQU 0 ; This is the only style run on the line
leftStyleRun EQU 1 ; This is leftmost of multiple style runs on the line
rightStyleRun EQU 2 ; This is rightmost of multiple style runs on the line
middleStyleRun EQU 3 ; There are multiple style runs on the line and this is neither the leftmost nor the rightmost.
smOnlyStyleRun EQU 0 ; obsolete
smLeftStyleRun EQU 1 ; obsolete
smRightStyleRun EQU 2 ; obsolete
smMiddleStyleRun EQU 3 ; obsolete
; type for styleRunPosition parameter in PixelToChar etc.
; typedef short JustStyleCode
FontInfo RECORD 0
ascent ds.w 1 ; offset: $0 (0)
descent ds.w 1 ; offset: $2 (2)
widMax ds.w 1 ; offset: $4 (4)
leading ds.w 1 ; offset: $6 (6)
sizeof EQU * ; size: $8 (8)
ENDR
FormatOrder RECORD 0
elements ds.w 1
sizeof EQU * ; size: $2 (2)
ENDR
; typedef FormatOrder * FormatOrderPtr
; FormatStatus was moved to TextUtils.i
OffPair RECORD 0
offFirst ds.w 1 ; offset: $0 (0)
offSecond ds.w 1 ; offset: $2 (2)
sizeof EQU * ; size: $4 (4)
ENDR
OffsetTable RECORD 0
elements ds.b 3 * OffPair.sizeof
sizeof EQU * ; size: $C (12)
ENDR
;
; pascal short Pixel2Char(Ptr textBuf, short textLen, short slop, short pixelWidth, Boolean *leadingEdge)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_Pixel2Char
move.l #$820E0014,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION Pixel2Char
ENDIF
;
; pascal short Char2Pixel(Ptr textBuf, short textLen, short slop, short offset, short direction)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_Char2Pixel
move.l #$820C0016,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION Char2Pixel
ENDIF
;
; pascal short PixelToChar(Ptr textBuf, long textLength, Fixed slop, Fixed pixelWidth, Boolean *leadingEdge, Fixed *widthRemaining, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_PixelToChar
move.l #$8222002E,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION PixelToChar
ENDIF
;
; pascal short CharToPixel(Ptr textBuf, long textLength, Fixed slop, long offset, short direction, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_CharToPixel
move.l #$821C0030,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION CharToPixel
ENDIF
;
; pascal void DrawJustified(Ptr textPtr, long textLength, Fixed slop, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_DrawJustified
move.l #$80160032,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION DrawJustified
ENDIF
;
; pascal void MeasureJustified(Ptr textPtr, long textLength, Fixed slop, Ptr charLocs, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_MeasureJustified
move.l #$801A0034,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION MeasureJustified
ENDIF
;
; pascal Fixed PortionLine(Ptr textPtr, long textLen, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_PortionLine
move.l #$84120036,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION PortionLine
ENDIF
;
; pascal void HiliteText(Ptr textPtr, short textLength, short firstOffset, short secondOffset, OffsetTable offsets)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_HiliteText
move.l #$800E001C,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION HiliteText
ENDIF
;
; pascal void DrawJust(Ptr textPtr, short textLength, short slop)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_DrawJust
move.l #$8008001E,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION DrawJust
ENDIF
;
; pascal void MeasureJust(Ptr textPtr, short textLength, short slop, Ptr charLocs)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_MeasureJust
move.l #$800C0020,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION MeasureJust
ENDIF
;
; pascal Fixed PortionText(Ptr textPtr, long textLength)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_PortionText
move.l #$84080024,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION PortionText
ENDIF
;
; pascal long VisibleLength(Ptr textPtr, long textLength)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_VisibleLength
move.l #$84080028,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION VisibleLength
ENDIF
;
; pascal void GetFormatOrder(FormatOrderPtr ordering, short firstFormat, short lastFormat, Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
Macro
_GetFormatOrder
move.l #$8012FFFC,-(sp)
dc.w $A8B5
EndM
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION GetFormatOrder
ENDIF
;
; pascal void TextFont(short font)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_TextFont: OPWORD $A887
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION TextFont
ENDIF
;
; pascal void TextFace(StyleParameter face)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_TextFace: OPWORD $A888
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION TextFace
ENDIF
;
; pascal void TextMode(short mode)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_TextMode: OPWORD $A889
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION TextMode
ENDIF
;
; pascal void TextSize(short size)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_TextSize: OPWORD $A88A
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION TextSize
ENDIF
;
; pascal void SpaceExtra(Fixed extra)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_SpaceExtra: OPWORD $A88E
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION SpaceExtra
ENDIF
;
; pascal void DrawChar(CharParameter ch)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_DrawChar: OPWORD $A883
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION DrawChar
ENDIF
;
; pascal void DrawString(ConstStr255Param s)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_DrawString: OPWORD $A884
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION DrawString
ENDIF
;
; pascal void DrawText(const void *textBuf, short firstByte, short byteCount)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_DrawText: OPWORD $A885
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION DrawText
ENDIF
;
; pascal short CharWidth(CharParameter ch)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_CharWidth: OPWORD $A88D
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION CharWidth
ENDIF
;
; pascal short StringWidth(ConstStr255Param s)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
_StringWidth: OPWORD $A88C
ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
IMPORT_CFM_FUNCTION StringWidth
ENDIF
;
; pascal short TextWidth(const void *textBuf, short firstByte, short byteCount)
;
IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN